package com.yang.vegetablessource;

import java.util.ArrayList;
import java.util.List;

import com.yang.vegetablessource.adapter.WorkingInfoAdapter;
import com.yang.vegetablessource.beans.WorkingInfo;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

public class MainActivityTabletVersion extends Activity {

	private ListView working_list;
	private List<WorkingInfo> list = new ArrayList<WorkingInfo>();
	private WorkingInfoAdapter adapter = null;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_mian_tablet_version);
		working_list = (ListView) findViewById(R.id.working_list);

		initData();
		adapter = new WorkingInfoAdapter(this, list);
		working_list.setAdapter(adapter);
	}

	private void initData() {
		WorkingInfo info1 = new WorkingInfo();
		info1.imageId = R.drawable.p1;
		info1.workerName = "郭庆钊";
		info1.workType = " 播种";
		info1.workTime = " 2012-07-25";

		WorkingInfo info2 = new WorkingInfo();
		info2.imageId = R.drawable.p2;
		info2.workerName = "陈成";
		info2.workType = " 人工除草";
		info2.workTime = " 2012-08-23";

		WorkingInfo info3 = new WorkingInfo();
		info3.imageId = R.drawable.p3;
		info3.workerName = "王建伟";
		info3.workType = " 施肥";
		info3.workTime = " 2012-09-18";

		WorkingInfo info4 = new WorkingInfo();
		info4.imageId = R.drawable.p4;
		info4.workerName = "李明欣";
		info4.workType = " 除虫";
		info4.workTime = " 2012-09-23";

		WorkingInfo info5 = new WorkingInfo();
		info5.imageId = R.drawable.p5;
		info5.workerName = "刘全凯";
		info5.workType = " 施肥";
		info5.workTime = " 2012-10-01";

		WorkingInfo info6 = new WorkingInfo();
		info6.imageId = R.drawable.p6;
		info6.workerName = "李大国";
		info6.workType = " 运输";
		info6.workTime = " 2012-10-25";

		list.add(info1);
		list.add(info2);
		list.add(info3);
		list.add(info4);
		list.add(info5);
		list.add(info6);
	}

}
